<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
       //关于逗号赋值问题
        /* 
        var a = 1
        var b = 2
        var x = 3
        var c = a,b,x    // c的值取自a
        var z = (a,b,x)  // z的值取自x

        // const let 不能在这里用,a,b,x这里隐藏了对b,x重新定义
        console.log(c)   // c输出1 
        console.log(z)   // z输出3
        console.log(a)   // a输出1 
        console.log(b)   // b输出2
        console.log(x)   // x输出3 */

        //关于逻辑且,逻辑非
        const a = 'a的值'
        const b = 'b的值'

        const x = a && b
        checked = a && b

        console.log(checked)

        if(a && b){
            console.log(x);
        }


    </script>
</body>
</html>